package com.yyge.convertor;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yyge.controller.publicInterface.req.PublicInterfaceAddReq;
import com.yyge.controller.publicInterface.req.PublicInterfaceEditReq;
import com.yyge.controller.publicInterface.req.PublicInterfaceReq;
import com.yyge.controller.publicInterface.resp.PublicInterfaceResp;
import com.yyge.entity.PublicInterface;
import com.yyge.vo.PageVo;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @program: js-hd
 * @description: 通用存储返回对象
 * @author: yyf
 * @create: 2024-01-29 11:37
 **/
@Mapper
public interface PublicInterfaceConvertor {
    PublicInterfaceConvertor MAPPER = Mappers.getMapper(PublicInterfaceConvertor.class);

    //Req -> Entity
    PublicInterface ob2en(PublicInterfaceReq req);

    //AddReq -> Entity
    PublicInterface ob2en(PublicInterfaceAddReq req);

    //Edit -> Entity
    PublicInterface ob2en(PublicInterfaceEditReq req);

    PublicInterfaceResp en2resp(PublicInterface article);

    List<PublicInterfaceResp> ob2respArr(List<PublicInterface> list);
    PageVo<PublicInterfaceResp> ob2respPage(Page<PublicInterface> page);
}
